package com.atgui.easyexcel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;

import java.util.Map;

/**
 * @author zhangfujing
 * @date 2024/3/11 17:38
 */
public class ExcelListener extends AnalysisEventListener<UserData> {
    //一行一行读取excel数据
    @Override
    public void invoke(UserData data, AnalysisContext context) {
        System.out.println(data);
    }

    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        System.out.println("表头信息:"+headMap);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {

    }
}
